#include <run/main.h>
#include <base/log.h>
#include <Main/run_in_frontend.h>
#include <iostream>
#include <thread>
#include <unistd.h>
#include <signal.h>


namespace Run {

}

void test() 
{
    // 检测dump时是否死锁
    LogInfo("main thread running test new");
    int *p = new int;
    LogInfo("main thread running test delete");
    delete p;
}

void testsignal() 
{
    signal(SIGILL, [](int signo) -> void {
        LogInfo("main thread catch test signalill");
    });
}

int main()
{
    // testsignal();
	std::cout << ::main << std::endl;
	Main::Start();
	//sleep(2);
    LogInfo("start");
	for(;;){ 
        // test();
        // LogInfo("start");
        // std::string tmp(10, 'z');
        // for (size_t s = 0; s < 5; ++s)
        //     LogInfo("%s", tmp.c_str());
        // LogInfo("end");
		sleep(2);
    };

	return 0;
}